using System.Collections;
using System.Collections.Generic;
using UnityEngine;

namespace Main.Details
{
    [CreateAssetMenu(fileName = "InventoryBag_SO", menuName = "Inventory/InventoryBag_SO", order = 0)]
    public class InventoryBag_SO : ZSWF_SOSingleton<InventoryBag_SO>
    {
        public List<InventoryItem> InventoryList;

        public bool TryGetInventoryItem(int id, out InventoryItem item)
        {
            item = new InventoryItem();
            for (int i = 0; i < InventoryList.Count; i++)
            {
                if (InventoryList[i].ItemID == id)
                {
                    item = InventoryList[i];
                    return true;
                }
            }
            return false;
        }
    }
}

